* {
  padding: 0;
  margin: 0;
  user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
}
body {
  overflow: hidden;
  background: #fff;
}
#stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-image: url(./imgs/bg.jpg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

#game {
  width: 100%;
  height: 100%;
  position: absolute;
}

#ui {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 10;
}

/* 分数样式 */
#ui .score-ui{
    width: 180px;
    height: 40px;
    margin-left: 20px;
    line-height: 40px;
    border-bottom: solid 2px #40c061;
    padding: 5px;
}
.score-ui img{
    width: 40px;
    height: 40px;
    position: fixed;
    top: 5px;
    left: 20px;
    z-index: 100;
}

#ui .score-ui p{
    color: #fff;
    font-size: 30px;
    position: fixed;
    left: 20px;
    top:60px;
}
#ui .score-ui span{
  color: #fff;
  font-size: 30px;
}

#ui #start-alert {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 30;
}

#start-alert .game-desc {
  width: 80%;
  margin: 100px auto;
  text-align: center;
}

#start-alert .game-desc .logo {
  width: 300px;
}
#start-alert .game-desc p {
  width: 300px;
  margin: auto;
  font-size: 16px;
  font-weight: 300;
  line-height: 30px;
  margin-top: 20px;
}
#start-alert footer {
  text-align: center;
  color: #fff;
}

#start-alert footer #start-btn {
  font-size: 30px;
  text-shadow: 0 0 1px #fff, 0 0 2px #fff, 0 0 4px #b6ff00, 0 0 7px #b6ff00,
    0 0 10px #b6ff00, 0 0 15px #b6ff00;
}
#start-alert footer p {
  color: rgb(255, 255, 255);
  font-size: 16px;
  line-height: 30px;
  margin-top: 30px;
}

#start-alert footer p::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  position: absolute;
  bottom: 100px;
  left: 50%;
  margin-left: -20px;
  background-image: url(./imgs/virus.png);
  background-repeat: no-repeat;
  background-size: 100%;
  opacity: 0.7;
}

/* 游戏结束的样式 */
/* 任务失败页面 */
#game-over-alert {
  width: 240px;
  height: 80px;
  border: solid 1px rgb(85, 255, 227);
  border-radius: 10px;
  color: #fff;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -120px;
  margin-top: -100px;
  z-index: 30;
  display: none;
  background-color:rgba(0,0,0,0.3);
}

#game-over-alert h1 {
  width: 150px;
  margin: 0 auto;
  margin-top: -40px;
  /* color:  rgb(85, 255, 227); */
  text-shadow: 0 0 15px  rgb(85, 255, 227);
}

#game-over-alert #restart-btn {
  font-size: 24px;
  margin-top: 20px;
}

/* 滑动动画 */
.slide-up {
  transform: translateY(-600px);
  transition: transform 0.4s ease-in-out;
}
.slide-down {
  transform: translateY(600px);
  transition: transform 0.4s ease-in-out;
}

/* 病毒样式 */
.virus {
  width: 80px;
  height: 80px;
  position: absolute;
  left: 200px;
  top: 100px;
  background-image: url(./imgs/virus.png);
  background-repeat: no-repeat;
  background-size: 100%;
}

.virus .letter {
  position: absolute;
  width: 60px;
  height: 60px;
  background-image: radial-gradient(rgba(255, 150, 150, 0), rgba(255, 0, 0, 1));
  text-align: center;
  color: #fff;
  line-height: 60px;
  border-radius: 100%;
  font-size: 28px;
  font-weight: 800;
  left: 10px;
  top: 10px;
  box-shadow: 0 0 15px #f00;
}

/* 警告页面 */
.warning {
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: linear-gradient(
    to right,
    rgba(255, 0, 0, 0.5) 0%,
    rgba(255, 0, 0, 0) 20%,
    rgba(0, 0, 0, 0) 80%,
    rgba(255, 0, 0, 0.5) 100%
  ) !important;
  z-index: 10;
  animation: color-fade 0.5s 3;
  opacity: 0;
}

/* 警告动画 */
@keyframes color-fade {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.fade-out {
  opacity: 0;
  transition: opacity 1s;
}